package com.csc.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/*@Author HoangHung*/
@Entity
public class Role implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private Integer idRole;
	private String nameRole;

	@OneToMany(mappedBy = "idRole")
	private List<User> roleUser;

	public List<User> getRoleUser() {
		return roleUser;
	}

	public void setRoleUser(List<User> roleUser) {
		this.roleUser = roleUser;
	}

	public Role(Integer idRole, String nameRole) {
		super();
		this.idRole = idRole;
		this.nameRole = nameRole;
	}

	/**
	 * 
	 */

	public Integer getIdRole() {
		return idRole;
	}

	public void setIdRole(Integer idRole) {
		this.idRole = idRole;
	}

	public String getNameRole() {
		return nameRole;
	}

	public void setNameRole(String nameRole) {
		this.nameRole = nameRole;
	}

	public Role() {
		super();

	}

	public Role(String nameRole) {
		super();
		this.nameRole = nameRole;
	}

}
